﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="List.aspx.vb" Inherits="TheNewDesigner._1List" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p>
        &nbsp;<asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource2">
    <ItemTemplate >
    <a href='List.aspx?TagName=<%#Eval("TagName") %>'>
    <%#Eval("TagName") %>
    </a> || 
    </ItemTemplate>
    </asp:Repeater>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:DesignerConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:DesignerConnectionString.ProviderName %>" 
            SelectCommand="SELECT [TagName] FROM [Tags]"></asp:SqlDataSource>
        <br />
    </p>
    <p>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            DataKeyNames="DesignerID"
            AllowSorting="True">
            <Columns>
                <asp:HyperLinkField DataNavigateUrlFields="DesignerID" 
                    DataNavigateUrlFormatString="Detail.aspx?DesignerID={0}" 
                    DataTextField="FirstName" HeaderText="First Name" />
                <asp:BoundField DataField="LastName" HeaderText="Last Name" 
                    SortExpression="LastName" />
                <asp:BoundField DataField="Gender" HeaderText="Gender" 
                    SortExpression="Gender" />
                <asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" />
                <asp:ImageField DataImageUrlField="ProfilePicture" HeaderText="Picture">
                    <ControlStyle CssClass="DesignersPic" />
                </asp:ImageField>
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:DesignerConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:DesignerConnectionString.ProviderName %>" 
            
            SelectCommand="SELECT [DesignerID], [FirstName], [LastName], [Gender], [DateOfBirth], [ProfilePicture], [Email], [BasicInfo] FROM [UserProfile] ORDER BY [DesignerID] DESC">
        </asp:SqlDataSource>
    </p>
    <p>
        &nbsp;</p>
    <p>
        <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
            ConnectionString="<%$ ConnectionStrings:DesignerConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:DesignerConnectionString.ProviderName %>" 
            
            SelectCommand="SELECT [ProfilePicture], [FirstName], [LastName], [BasicInfo], [TagName], [DesignerID], [Gender], [DateOfBirth], [Email] FROM [UserTagsView] WHERE ([TagName] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="TagName" QueryStringField="TagName" 
                    Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
        </asp:Content>
